#include "EvaluatorDataReaderFactory.h"
#include "EvaluatorDataAreaSoundReader.h"
#include "EvaluatorDataCSReader.h"
#include "EvaluatorDataDepthReader.h"
#include "EvaluatorDataRainReader.h"
#include "EvaluatorDataShipNoiseReader.h"
#include "EvaluatorDataWindReader.h"

class reader::EvaEnvDataReaderFactoryPrivate 
{
public:
};

reader::EvaEnvDataReaderFactory::EvaEnvDataReaderFactory()
	: d(new EvaEnvDataReaderFactoryPrivate)
{
}

reader::EvaEnvDataReaderFactory::~EvaEnvDataReaderFactory()
{
	delete d;
}

reader::EvaEnvDataReaderFactory* reader::EvaEnvDataReaderFactory::Single()
{
	static EvaEnvDataReaderFactory factory;
	return &factory;
}

std::shared_ptr<reader::EvaEnvDataReaderBase> reader::EvaEnvDataReaderFactory::create(algobase::EvaluateEnvirDataType type)
{
	switch (type) 
	{
		case algobase::EEDT_AreaSound:
		{
			return std::make_shared<reader::EvaEnvDataAreaSoundReader>();
		}
		case algobase::EEDT_CS_UO:
	//  case algobase::EEDT_CS_VO:
		{
			return std::make_shared<reader::EvaEnvDataCSReader>();
		}
		case algobase::EEDT_Depth: 
		{
			return std::make_shared<reader::EvaEnvDataDepthReader>();
		}
		case algobase::EEDT_Rain:
		{
			return std::make_shared<reader::EvaEnvDataRainReader>();
		}
		case algobase::EEDT_ShipNoise: 
		{
			return std::make_shared<reader::EvaEnvDataShipReader>();
		}
		case algobase::EEDT_Wind: 
		{
			return std::make_shared<reader::EvaEnvDataWindReader>();
		}
		default: 
		{
			break;
		}
	}

	return nullptr;
}
